<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>底部按钮</title>

<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" href="dist/css/bootstrap.css">
<link rel="stylesheet" href="dist/css/font-awesome-4.4.0/font-awesome.min.css">
<link rel="stylesheet" href="css/AdminLTE.css">

</head>
<body style="background-color:rgb(239,238,255);">
	<div style="margin-top:10px;margin-left:10px;">
	<form name=bt onsubmit="check_search()">
		<table border="0" cellspacing="5" cellpadding="0">
		<tr>
			<td>
				<select id="querytype" size="1">
					<option value="1">按课程号查</option>
					<option value="2">按课程名查</option>
					<option value="3">按主讲教师查</option>
				</select>&nbsp;
				<input type="text" id="inputvalue" size=10> 
				<input type="button" value="课程查询" onclick="check_search()" style="background-color:rgb(44,102,148);color:#fff">
			</td>
			
			<td><a href="main-ting-course" target="top">
				<input type="button" value="免听查询" style="background-color:rgb(44,102,148);color:#fff">
				</a>
			</td>
			
			<td><a href="course-table" target="top">
				<input type="button" value="课程表" style="background-color:rgb(44,102,148);color:#fff">
				</a>
			</td>

			<td><a href="course-list" target="top">
				<input type="button" value="选课结果" style="background-color:rgb(44,102,148);color:#fff">
				</a>
			</td><!-- 

			<td><input type="button" value="退 课"
				onclick="check_revoke()" style="background-color:rgb(44,102,148);color:#ff0080"></td>
			
			<td><input type="button" value="选 课"
				onclick="check_selected()" style="background-color:rgb(44,102,148);color:#fff"></td>
			
			<td><input type="button" value="清除"
				onclick="clear_selected()" style="background-color:rgb(44,102,148);color:#fff"></td>
			 -->
			<td><input type="button" value="黄牌预警"
				onclick="javascript:window.open('yellow-warning','Warning','width=860,height=600,scrollbars=yes');"
				style="background-color:rgb(44,102,148);color:#fff"></td>
			
			<td><a href="personal-info" target="middle">
				<input type="button" value="个人信息" style="background-color:rgb(44,102,148);color:#fff">
				</a>
			</td>
			
			<td><a href="instruction" target="middle">
				<input type="button" value="使用说明" style="background-color:rgb(44,102,148);color:#fff">
				</a>
			</td>

			<td><input type="button" value="退出"
				onclick="quit_sys()" style="background-color:rgb(44,102,148);color:#fff">
			</td>
		</table>
		<!--<INPUT TYPE="hidden" name="student_no" value="2013150257">-->
		<input type="hidden" name="modify_flag" value="n"> 
		<input type="hidden" name="ph_permit" value="0">
	</form>
	</div>
	
	   
	<script src="js/app.js"></script>
	<script src="dist/js/jquery-2.2.3.min.js"></script>
	<script src="dist/js/bootstrap.js"></script>
	
	<script type="text/javascript">
		function quit_sys() {
			result=window.confirm("确定退出系统吗?");
			if (result == true) {
				$.ajax({
					url:'/ui/quitsys',
					data:{
					},
					type:'POST',
					dataType:"text",
					success:function(data){						
						if(data.indexOf("quit")>=0) {
							parent.location.href = "login";
						}						
					},
					error:function() {
						window.alert("系统错误,请重试");
					} 
				});
			}					
		}
		
		function check_search() {
			var objS = document.getElementById("querytype");
			var type = objS.options[objS.selectedIndex].value;
			var value = $("#inputvalue").val();
			
			if(type == "1") {
				//按课程号查
				parent.parent.middle.location='get-course-by-account?searchID='+value;
			} else if(type == "2") {
				//按课程名查
				parent.parent.middle.location='get-course-by-name?searchName='+value;
			} else if(type == "3") {
				//按课程名查
				parent.parent.middle.location='get-course-by-teachername?searchTeacherName='+value;
			}
		}
	</script>
</body>
</html>